<!-- 多选框控件 -->
<template>
  <a-checkbox-group
    v-model="modelValue"
    :max="getProps.max"
    :disabled="disabled"
  >
    <a-radio
      v-for="(item, index) in getProps.checkBoxOptions"
      :key="index"
      :value="item.value"
    >
      {{ item.label }}
    </a-radio>
  </a-checkbox-group>
</template>

<script lang="ts" setup>
const props = withDefaults(
  defineProps<{
    props: { [propName: string]: any };
    name?: string;
    required?: boolean;
    oneValue: any;
    disabled?: boolean;
    regex?: {
      [name: string]: {
        role: any;
        name: any;
      };
    };
  }>(),
  {}
);
const emit = defineEmits(['update:oneValue']);
const modelValue = computed({
  get: () => {
    return props.oneValue;
  },
  set: (val) => {
    emit('update:oneValue', val);
  }
});
//复制一份props
const getProps = computed(() => {
  return props.props;
});
</script>

<style scoped lang="less"></style>
